# Contributor: xcko <xcko@airmail.cc>
# Maintainer: xcko <xcko@airmail.cc>
pkgname=mpop
pkgver=1.4.16
pkgrel=0
pkgdesc="retrieves mail from pop3 mailboxes"
url="https://marlam.de/mpop"
arch="all"
license="GPL-3.0-or-later"
options="!check" # no test suite
makedepends="gettext-dev gnutls-dev libsecret-dev libidn2-dev"
subpackages="$pkgname-doc $pkgname-lang $pkgname-vim:vim:noarch"
source="https://marlam.de/mpop/releases/mpop-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

vim() {
	pkgdesc="Vim syntax for $pkgname"

	install -Dm644 "$builddir"/scripts/vim/$pkgname.vim \
		"$subpkgdir"/usr/share/vim/vimfiles/syntax/$pkgname.vim
}

sha512sums="
a1dea5d2d124596fe86f5edbbfd01e3a97342caefe269c4e0c159d278658b8e39212b23544bfd775a9e6ba5c0d87b84c0004fdd698a5893074cc1b53a0e7567f  mpop-1.4.16.tar.xz
"
